﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Customers.aspx.cs" Inherits="famails.BackEnd.Customer.Customers" MasterPageFile="~/Master.Master" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div style="width: 100%; padding: 10px;">
    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border: 1px solid #333; margin-bottom: 10px; padding: 0px;">
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
            Thêm khách hàng
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
            <asp:HiddenField ID="hdfCustomerId" runat="server" />
            <asp:Panel Visible="false" ID="pnError" runat="server">
                <div class="error-box round">
                    <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                </div>
            </asp:Panel>
            <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                <div class="confirmation-box round">
                    <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                </div>
            </asp:Panel>
        </div>
        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Họ và tên</label>
                    <asp:TextBox ID="txtName" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" runat="server"></asp:TextBox>
                    <em style="color: #333;">Tên đầy đủ của khách hàng</em>
                </p>
            </fieldset>
        </div>


        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Di động</label>
                    <asp:TextBox ID="txtPhone" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" runat="server"></asp:TextBox>
                    <em style="color: #333;">Số di động khách hàng.</em>
                </p>
            </fieldset>
        </div>

        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Giới tính</label>
                    <asp:DropDownList ID="drlGender" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" AutoPostBack="true">
                        <asp:ListItem Value="Nam">Nam</asp:ListItem>
                        <asp:ListItem Value="Nữ">Nữ</asp:ListItem>
                    </asp:DropDownList>
                    <em style="color: #333;">Giới tính khách hàng</em>
                </p>
            </fieldset>
        </div>


        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Nghề nghiệp</label>
                    <asp:TextBox ID="txtCompany" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" runat="server"></asp:TextBox>
                    <em style="color: #333;">Nghề nghiệp của khách hàng.</em>
                </p>
            </fieldset>
        </div>


        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Ngày sinh</label>
                    <%--<asp:TextBox ID="txtBirthday" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" runat="server"></asp:TextBox>--%>
                    <div id="txtBirthday"></div>
                    <asp:HiddenField runat="server" id="txtBirthday_v" ></asp:HiddenField>
                    <em style="color: #333;">Ngày sinh của khách hàng.</em>
            </fieldset>
        </div>

        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Địa chỉ</label>
                    <asp:TextBox ID="txtAddress" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" runat="server"></asp:TextBox>
                    <em style="color: #333;">Địa chỉ khách hàng.</em>
                </p>
            </fieldset>
        </div>

        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Email</label>
                    <asp:TextBox ID="txtEmail" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" runat="server"> </asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                        Display="Dynamic" ErrorMessage="Email không hợp lệ" ValidationExpression="^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$"
                        ValidationGroup="CheckInput_Email"></asp:RegularExpressionValidator>
                    <em style="color: #333;">Email của khách hàng.</em>
                </p>
            </fieldset>
        </div>

        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto; padding: 10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Nhóm khách hàng</label>
                    <asp:DropDownList ID="drlGroup" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;">
                    </asp:DropDownList>
                </p>
            </fieldset>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 5px;">
                <button ValidationGroup="CheckInput_Email" runat="server" class="btn col-xs-6 col-lg-1 col-md-2 col-sm-3" style="border:1px solid #fff;float:left;background:#333;color:#fff;text-align:center;padding:6px 15px;border-radius:0px;" 
                    onserverclick="btnAdd_Click">
                    <i style="margin-right:10px;" class="fa fa-save"></i> Lưu
                </button>
                <button ValidationGroup="CheckInput_Email" runat="server" class="btn col-xs-6 col-lg-2 col-md-2 col-sm-4" style="border:1px solid #fff;float:left;background:#333;color:#fff;text-align:center;padding:6px 15px;border-radius:0px;" 
                    onserverclick="btnRefesh_Click">
                    <i style="margin-right:10px;" class="fa fa-refresh"></i> Nhập lại
                </button>
        </div>
        <style>
            table th {
                padding: 10px !important;
                background: #333 !important;
                color: #fff !important;
                font-weight: bold !important;
            }

            table td {
                padding: 5px !important;
            }
        </style>
    </div>
</div>
    <script type="text/javascript">
        $(function () {
            $("#txtBirthday").jqxDateTimeInput({ width: '120px', height: '34px' });
            if ($('#ContentPlaceHolder1_txtBirthday_v').val() != undefined) {
                $('#txtBirthday').jqxDateTimeInput('val', $('#ContentPlaceHolder1_txtBirthday_v').val());
                $('#ContentPlaceHolder1_txtBirthday_v').val($("#txtBirthday").jqxDateTimeInput("getText"));
            }
            $('#txtBirthday').on('valuechanged', function (event) {
                $('#ContentPlaceHolder1_txtBirthday_v').val($("#txtBirthday").jqxDateTimeInput("getText"));
            });
        });
    </script>
</asp:Content>
